<?php
class Karyawan_telepon_model extends MY_Model {
	
    function Karyawan_telepon_model(){
        parent::MY_Model();
        $this->load->database();
        $this->table_name = "karyawan_telepon";
    }
    
    /**
     * 
     * @param $search_key
     * @param $where
     * @param $limit
     * @param $offset
     * @param $orderby
     */
    function select_last_entry($search_key=false, $where=false, $limit=10, $offset=0, $orderby=""){}
        
    /**
     * 
     * @param $id
     */
    function select_by_id($id){
    	return $query = $this->db->get_where($this->table_name, array('kary_tlp_no' => $id));
    }
    
 	function select_by_karyawan($kary_id, $orderby=false){
 		if ($orderby){
    		foreach($orderby as $field=>$value){
    			$this->db->order_by($field, $value);
    		}
    	}
    	return $this->db->get_where($this->table_name, array('kary_id' => $kary_id)); 
    }
}